package edu.bit.water.dao;

import edu.bit.water.entity.LabelWaterSaving;
import edu.bit.water.entity.MetaWaterSaving;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author HJS
 */
@Mapper
@Repository
public interface LabelWaterSavingDao {

    //显示标签表中所有记录数据
    List<LabelWaterSaving> select();
    //插入新增数据
    int insert(LabelWaterSaving labelWaterSaving)throws DuplicateKeyException;
    //根据给定的id号，更新所有字段
    int update(LabelWaterSaving labelWaterSaving)throws DuplicateKeyException;
    //4.根据给定id号，删除表中相应记录
    int delete(int id);
    //5.查询META_WATER_SAVING中的所有记录
    List<MetaWaterSaving> getBasis();
    //查询META_WATER_SAVING中的标准状态
    List<MetaWaterSaving> getStandardStatus();
}
